
namespace Patterns4Net.Attributes.DesignPatterns
{
    using System;

    /// <summary>
    /// Use this attribute to annotate a type as an implementation of the Immutable pattern.
    /// Immutable class should not allow to change the state of its instance once it is 
    /// accessible by the outside world.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
    public sealed class ImmutableAttribute : Attribute, IPatternAttribute
    {
        /// <summary>
        /// Gets or sets the flag that indicates whether this implementation should 
        /// be deeply immutable. Deeply immutable class should has only public fields or 
        /// properties of immutable types.
        /// </summary>
        public bool Deep { get; set; }
    }
}
